Getting POI data from open street map onto Garmin devices

This turns out to be really easy.  I came to want to do this as I could see lots of things on open street map based mapping on my Garmin, but I couldn't route to them.  A case in point is toilets - these are ameneties in open street map and are listed as such, but they do not appear anywhere in the Garmin POI.

The steps to creating a POI file and uploading it to my Garmin were quite easy.

1. Download the OSM file for the region you are interested in.
2. Use "osmosis" to extract the coordinates
3. Process the file produced by osmosis  to get a garmin compatible csv file
4. Use Garmin POI loader to transfer the POI data to your Garmin device -  detailed tutorial.

Download the OSM "planet" file

Find the osm planet file at Cloud Made Downloads.  Save it and unzip it.  In the example below I used england.osm

Use Osmosis to extract the coordinates of the amenity

Download osmosis here and unzip it into the folder with your osm file (I know this isn't the best way to it, but it's simple and it works).

A list of amenities can be found in the OSM wiki.

osmosis -q --rx england.osm --tf accept-nodes amenity=toilets --tf reject-ways --tf reject-relations --wx toilets.osm

The last parameter is the output file.  It contains all the data we need, but not quite in the right format.

Process the output from osmosis into Garmin form

The osmosis output has much more information than you need.  The garmin POI is just a csv file with longitude, latitude and description.

I have two strategies for this.  One is to paste the data into a spreadsheet which extracts latitude and longitude data, the other is to use a python script to extract the data from the file produced by osmosis.

Here is an example spreadsheet with UK toilets.  You paste the data into column A, columns B,C,D then check if the words lat and logn appear and where.  Columns E,F,G then extract the lat and long data and describe the amenity.  You then copy E,F,G to sheet 2 (use paste special to pate values, not formulas - in open office paste text and numbers is equavalent to pasting values in Excel).  Next sort so that the empyt rows go to the bottom, finally save as a scv file ready to upload to your gps using poi loader.

Here is the python script I used to get the latitude, longitude and (usually) name of 24,000 English pubs from the osm file created by osmosis (using amenity=pub).

Upload to your GPS

Here is an excellent tutorial in how to use Garmin's POI loader.

Sample POI files


Public toilets in the UK
Pubs in England